func go/types.assert

126 uses

	go/types (current package)
		assignments.go#L121: 	assert(isConstType(x.typ))
		builtins.go#L319: 			assert(!isTypeParam(typ))
		builtins.go#L447: 			assert(!isTypeParam(typ))
		builtins.go#L885: 		assert(!isUntyped(res))
		call.go#L30: 	assert(len(targs) == len(ix.Indices))
		call.go#L52: 	assert(got == want)
		call.go#L56: 	assert(res.TypeParams().Len() == 0) // signature is not generic anymore
		call.go#L64: 	assert(check != nil)
		call.go#L65: 	assert(len(targs) == typ.TypeParams().Len())
		call.go#L77: 	assert(len(xlist) <= len(targs))
		call.go#L104: 			assert(x.mode == value)
		call.go#L194: 		assert(len(targs) == len(xlist))
		call.go#L397: 		assert(rsig.TypeParams().Len() == 0) // signature is not generic anymore
		call.go#L448: 			assert(pname.pkg == check.pkg)
		call.go#L496: 				assert(exp.Val() != nil)
		check.go#L390: 	assert(top <= len(check.delayed)) // stack must not have shrunk
		check.go#L419: 	assert(x.expr != nil && typ != nil)
		check.go#L445: 	assert(x != nil)
		check.go#L446: 	assert(typ != nil)
		check.go#L451: 		assert(val != nil)
		check.go#L454: 		assert(typ == Typ[Invalid] || allBasic(typ, IsConstType))
		check.go#L480: 	assert(x != nil)
		check.go#L484: 	assert(isTyped(a[0]) && isTyped(a[1]) && (isBoolean(a[1]) || a[1] == universeError))
		check.go#L488: 			assert(tv.Type != nil) // should have been recorded already
		check.go#L513: 	assert(ident != nil)
		check.go#L514: 	assert(typ != nil)
		check.go#L540: 	assert(id != nil)
		check.go#L547: 	assert(id != nil)
		check.go#L548: 	assert(obj != nil)
		check.go#L555: 	assert(node != nil)
		check.go#L556: 	assert(obj != nil)
		check.go#L563: 	assert(obj != nil && (recv == nil || len(index) > 0))
		check.go#L571: 	assert(node != nil)
		check.go#L572: 	assert(scope != nil)
		context.go#L46: 	assert(ctxt != nil)
		context.go#L47: 	assert(orig != nil)
		context.go#L89: 	assert(inst != nil)
		decl.go#L102: 		assert(obj.Type() == nil)
		decl.go#L112: 		assert(obj.Type() != nil)
		decl.go#L164: 		assert(obj.Type() != nil)
		decl.go#L221: 	assert(obj.color() >= grey)
		decl.go#L418: 	assert(obj.typ == nil)
		decl.go#L464: 	assert(obj.typ == nil)
		decl.go#L489: 		assert(lhs == nil || lhs[0] == obj)
		decl.go#L534: 	assert(obj.typ == nil)
		decl.go#L579: 	assert(rhs != nil)
		decl.go#L620: 	assert(!check.inTParamList)
		decl.go#L705: 	assert(!check.objMap[obj].tdecl.Assign.IsValid()) // don't use TypeName.IsAlias (requires fully set up object)
		decl.go#L714: 		assert(base.targs.Len() == 0) // collectMethods should not be called on an instantiated type
		decl.go#L727: 			assert(m.name != "_")
		decl.go#L728: 			assert(mset.insert(m) == nil)
		decl.go#L736: 		assert(m.name != "_")
		decl.go#L755: 			assert(m.name != "_")
		decl.go#L756: 			assert(mset.insert(m) == nil)
		decl.go#L779: 	assert(obj.typ == nil)
		decl.go#L782: 	assert(check.iota == nil)
		decl.go#L880: 							assert(obj.typ != nil)
		errors.go#L19: func assert(p bool) {
		errors.go#L263: 		assert(start <= pos && pos < end)
		expr.go#L91: 	assert(x.mode == constant_)
		expr.go#L424: 	assert(v != nil)
		expr.go#L433: 	assert(x.mode == constant_)
		expr.go#L1721: 	assert(hint != nil)
		expr.go#L1771: 			assert(t.Len() != 1)
		index.go#L366: 	assert(ok)
		infer.go#L35: 			assert(result == nil || len(result) == len(tparams))
		infer.go#L37: 				assert(targ != nil)
		infer.go#L52: 	assert(n > 0 && len(targs) <= n)
		infer.go#L55: 	assert(params.Len() == len(args))
		infer.go#L324: 	assert(index >= 0 && targs[index] == nil)
		infer.go#L468: 	assert(len(tparams) >= len(targs) && len(targs) > 0)
		infer.go#L562: 		assert(nn <= n)
		infer.go#L579: 			assert(targ == nil || types[i] == targ)
		infer.go#L670: 			assert(n == 0)
		infer.go#L682: 			assert(debug && under(single.typ) == coreType(tpar))
		labels.go#L59: 		assert(b.gotoTarget(name) == nil)
		lookup.go#L156: 						assert(f.typ != nil)
		lookup.go#L186: 					assert(m.typ != nil)
		lookup.go#L414: 	assert(isInterfacePtr(T))
		methodlist.go#L43: 	assert(!l.isLazy())
		methodlist.go#L53: 	assert(!l.isLazy())
		methodlist.go#L74: 	assert(resolve != nil)
		mono.go#L213: 			assert(typ.Obj().Pkg() == pkg)
		named.go#L120: 	assert(t.targs.Len() == 0)
		named.go#L144: 	assert(t.TypeArgs().Len() > 0) // t must be an instance
		named.go#L149: 	assert(origm != nil)
		named.go#L202: 	assert(t.targs.Len() == 0)
		named.go#L218: 	assert(t.targs.Len() == 0)
		named.go#L360: 	assert(n.orig.underlying != nil)
		named.go#L367: 		assert(check != nil)
		object.go#L156: func (obj *object) setOrder(order uint32)     { assert(order > 0); obj.order_ = order }
		object.go#L157: func (obj *object) setColor(color color)      { assert(color != white); obj.color_ = color }
		object.go#L488: 		assert(Identical(typ, &emptyInterface))
		operand.go#L253: 		assert(Vp == nil)
		resolver.go#L104: 	assert(ident.Name == obj.Name())
		scope.go#L141: 	assert(p != nil)
		scope.go#L157: 	assert(j >= 0)
		sizes.go#L72: 		assert(!isTypeParam(T))
		sizes.go#L128: 		assert(isTyped(T))
		sizes.go#L159: 		assert(!isTypeParam(T))
		stmt.go#L371: 			assert(scope == check.scope)
		subst.go#L16: 	assert(len(tpars) == len(targs))
		subst.go#L27: 	assert(len(from) == len(to))
		typeset.go#L117: 		assert(t.typ != nil)
		typeset.go#L133: 		assert(t.typ != nil)
		typeset.go#L140: 			assert(Identical(u, under(u)))
		typeset.go#L275: 			assert(!isTypeParam(typ))
		typeset.go#L296: 			assert(!tset.comparable)
		typeset.go#L297: 			assert(len(tset.methods) == 0)
		typeset.go#L351: 			assert(t.typ != nil)
		typeset.go#L362: 	assert(!comp || terms.isAll()) // comparable invariant
		typeset.go#L407: 			assert(!isTypeParam(t.typ))
		typestring.go#L90: 	assert(ctxt != nil)
		typestring.go#L323: 	assert(w.ctxt != nil)
		typestring.go#L442: 			assert(w.tparams == nil)
		typexpr.go#L66: 	assert(typ != nil)
		typexpr.go#L95: 		assert(x.val != nil)
		typexpr.go#L183: 	assert(isTyped(typ))
		typexpr.go#L197: 	assert(isTyped(typ))
		unify.go#L132: 			assert(i == tpar.index)
		unify.go#L214: 	assert(ti != 0 && tj != 0)
		unify.go#L233: 	assert(typ != nil)
		union.go#L55: 	assert(len(blist) == len(tlist)-1)
		union.go#L167: 	assert(!IsInterface(y.typ))
		universe.go#L251: 	assert(obj.color() == black)
		validtype.go#L81: 			assert(t.obj.pkg == check.pkg)